﻿create or replace package PKG_STDCODE_GROUP_MAPPING is

  -- Author  : HY
  -- Created : 2013-07-24 오후 1:07:54
  -- Purpose : 코드그룹 매핑 패키지 (추가, 수정, 삭제)

  -- Public function and procedure declarations
  procedure ADD_STDCODE_GROUP_MAPPING (GROUP_OBJECTID_IN IN NUMBER, MAPPING_OBJECTID_IN IN NUMBER, CREATE_USER_IN NUMBER);
  procedure DELETE_STDCODE_GROUP_MAPPING (OBJECTID_IN IN NUMBER);

end PKG_STDCODE_GROUP_MAPPING;







create or replace package body PKG_STDCODE_GROUP_MAPPING as

  -- 추가
  procedure ADD_STDCODE_GROUP_MAPPING (GROUP_OBJECTID_IN IN NUMBER, MAPPING_OBJECTID_IN IN NUMBER, CREATE_USER_IN NUMBER) is
  begin
       INSERT INTO STDCODE_GROUP_MAPPING (OBJECTID, GROUP_OBJECTID, MAPPING_OBJECTID, STATE, CREATE_USER)
       VALUES (SEQ_STDCODE_GROUP_MAPPING.NEXTVAL, GROUP_OBJECTID_IN, MAPPING_OBJECTID_IN, 0, CREATE_USER_IN);
  end ADD_STDCODE_GROUP_MAPPING;

  -- 삭제
  procedure DELETE_STDCODE_GROUP_MAPPING (OBJECTID_IN IN NUMBER) is
  begin
       DELETE FROM STDCODE_GROUP_MAPPING A WHERE A.OBJECTID = OBJECTID_IN;
  end DELETE_STDCODE_GROUP_MAPPING;

end PKG_STDCODE_GROUP_MAPPING;
